import { createRouter, createWebHashHistory } from "vue-router";
import { qiankunWindow } from "vite-plugin-qiankun/dist/helper";

const basename = qiankunWindow.__POWERED_BY_QIANKUN__ ? "/viteApp" : "/";

const router = createRouter({
  history: createWebHashHistory(basename),
  routes: [
    {
      path: "/",
      redirect: "/test",
      children: [
        {
          path: "test",
          name: "Test",
          component: () => import("@/views/test.vue"),
        },
      ],
    },
  ],
});

export default router;
